package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * <p>
 * Description: 
 * </p>
 *
 * @author dongyushi
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2013-3-13 上午9:42:18          dongyushi        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
@Entity
@Table(name = "PROCESS_RULE")
public class ProcessRule implements java.io.Serializable {

    private static final long serialVersionUID = 83763978005361039L;
    private Long id;
    private Long resId;
    private String name;
    private String eventLevels;
    private Integer status;
    private String sendClass;

    public ProcessRule() {
    }

    public ProcessRule(Long id) {
        this.id = id;
    }

    /** full constructor */
    public ProcessRule(Long id, Long resId, String name, String eventLevels, Integer status) {
        this.id = id;
        this.resId = resId;
        this.name = name;
        this.eventLevels = eventLevels;
        this.status = status;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "WORK_ORDER_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "NAME", length = 128)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "EVENT_LEVELS", length = 32)
    public String getEventLevels() {
        return this.eventLevels;
    }

    public void setEventLevels(String eventLevels) {
        this.eventLevels = eventLevels;
    }

    @Column(name = "STATUS", precision = 1, scale = 0)
    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "SEND_CLASS", length = 256)
    public String getSendClass() {
        return this.sendClass;
    }

    public void setSendClass(String sendClass) {
        this.sendClass = sendClass;
    }

    @Override
    public String toString() {
        return "WorkOrder [id=" + id + ", resId=" + resId + ", name=" + name + ", eventLevels=" + eventLevels + ", status=" + status + "]";
    }

}
